package edu.fzu.crud.service;

import edu.fzu.crud.bean.Department;
import edu.fzu.crud.dao.DepartmentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author JohnCarraway
 * @create 2020-12-03 0:50
 */
@Service
public class DepartmentService {

    @Autowired
    private DepartmentMapper departmentMapper;

    // 获取所有部门信息
    public List<Department> getDepts(){
        List<Department> list = departmentMapper.selectByExample(null);
        return list;
    }
}
